var sqlMap = {
  user: {
    select: 'select * from user',
    add: 'insert into user (username, password) values (?,?)',
  },

  familyManagement: {
    selectAll : 'select * from familymanagement',
    delete : 'delete from familymanagement',
    add : 'insert into familymanagement (name,familyName,idCard,sex,age,relationship,province,lastVisit,religion) values (?,?,?,?,?,?,?,?,?)',
    edit : 'UPDATE familymanagement SET name = ? , familyName = ? , idCard = ? , sex = ? , age = ? , relationship = ? , province = ? , lastVisit = ? , religion = ? WHERE id = ? '
  },

  olderManManagement:{
    selectAll : 'select * from oldermanmanagement',
    delete : 'delete from oldermanmanagement',
    add : 'insert into oldermanmanagement (name,idCard,sex,age,healthy,province,date,religion,hobbies) values (?,?,?,?,?,?,?,?,?)',
    edit : 'UPDATE oldermanmanagement SET name = ? , idCard = ? , sex = ? , age = ? , healthy = ? , province = ? , date = ? , religion = ? , hobbies = ? WHERE id = ? '
  },

  healthManagement:{
    selectAll : 'select * from healthmanagement',
    delete : 'delete from healthmanagement',
    add : 'insert into healthmanagement (name,idCard,medicalHistory,disease,rehabilitation,isCure,age,remark) values (?,?,?,?,?,?,?,?)',
    edit : 'UPDATE healthmanagement SET name = ? , idCard = ? , medicalHistory = ? , disease = ? , rehabilitation = ? , isCure = ? , age = ? , remark = ?  WHERE id = ? '
  },

  consultManagement:{
    selectAll : 'select * from consultmanagement',
    delete : 'delete from consultmanagement',
    add : 'insert into consultmanagement (name,sex,age,province,date,willingness,contact,consult,suggest) values (?,?,?,?,?,?,?,?,?)',
    edit : 'UPDATE consultmanagement SET name = ? , sex = ? , age = ? , province = ? , date = ? , willingness = ? , contact = ? , consult = ? , suggest = ?  WHERE id = ? '
  },

  visitManagement:{
    selectAll : 'select * from visitmanagement',
    delete : 'delete from visitmanagement',
    add : 'insert into visitmanagement (visitName,oldName,relation,charged,contact,date) values (?,?,?,?,?,?)',
    edit : 'UPDATE visitmanagement SET visitName = ? , oldName = ? , relation = ? , charged = ? , contact = ? , date = ? WHERE id = ? '
  },

  careMessageManagement:{
    selectAll : 'select * from caremessagemanagement',
    delete : 'delete from caremessagemanagement',
    add : 'insert into caremessagemanagement (name,idCard,sex,age,province,date,position,salary,isWorking,remark) values (?,?,?,?,?,?,?,?,?,?)',
    edit : 'UPDATE caremessagemanagement SET name = ? , idCard = ? , sex = ? , age = ? , province = ? , date = ? , position = ? , salary = ? , isWorking = ? , remark = ? WHERE id = ? '
  },

  careDailyManagement:{
    selectAll : 'select * from caredailymanagement',
    delete : 'delete from caredailymanagement',
    add : 'insert into caredailymanagement (name,position,beforeMoningToday,afterMoningToday,beforeAfternoonToday,afterAfternoonToday,beforeMoningTom,afterMoningTom,beforeAfternoonTom,afterAfternoonTom,date,remark) values (?,?,?,?,?,?,?,?,?,?,?,?)',
    edit : 'UPDATE caredailymanagement SET name = ? , position = ? , beforeMoningToday = ? , afterMoningToday = ? , beforeAfternoonToday = ? , afterAfternoonToday = ? , beforeMoningTom = ? , afterMoningTom = ? , beforeAfternoonTom = ? , afterAfternoonTom = ? , date = ? , remark = ? WHERE id = ? '
  },

  bedMessageManagement:{
    selectAll : 'select * from bedmessagemanagement',
    delete : 'delete from bedmessagemanagement',
    add : 'insert into bedmessagemanagement (room,bed,isOccupy,name,sex,age,activeAbility,dysfunction,selfCare,date) values (?,?,?,?,?,?,?,?,?,?)',
    edit : 'UPDATE bedmessagemanagement SET room = ? , bed = ? , isOccupy = ? , name = ? , sex = ? , age = ? , activeAbility = ? , dysfunction = ? , selfCare = ? , date = ? WHERE id = ? '
  },

  userManagement:{
    selectAll : 'select * from usermanagement',
    delete : 'delete from usermanagement',
    addSave : 'insert into usermanagement (name,userNumber,userName,position,department,contact,date,manage_status,manage_describe) values (?,?,?,?,?,?,?,?,?)',
    edit : 'UPDATE usermanagement SET name = ? , userNumber = ? , userName = ? , position = ? , department = ? , contact = ? , date = ? , manage_status = ? , manage_describe = ?  WHERE id = ? '
  },

  announcements:{
    selectAll : 'select * from announcements',
    delete : 'delete from announcements',
    addSave : 'insert into announcements (title,type,announceStatus,person,publish,textarea,date) values (?,?,?,?,?,?,?)',
    edit : 'UPDATE announcements SET title = ? , type = ? , announceStatus = ? , person = ? , publish = ? , textarea = ? , date = ? WHERE id = ?'
  },
}

module.exports = sqlMap;